using System;
using System.Collections.Generic;
using System.Text;

namespace GameFramework
{
    public class Form
    {
        private IMesh mesh = null;
        private Entity owner = null;
        private List<State> states = null;

        public Form(Entity owner, IMesh mesh)
        {
            this.mesh = mesh;
            this.owner = owner;
            mesh.SetOwner(this);
            mesh.Init();
            states = new List<State>();
            GameManager.GetCurrent().AddForm(this);
        }

        public void Terminate()
        {
            GameManager.GetCurrent().RemoveForm(this);
            mesh.Terminate();
        }

        public IMesh GetMesh()
        {
            return mesh;
        }

        public Entity GetOwner()
        {
            return owner;
        }

        public virtual BoundingBox getBoundingBox()
        {
            return null;
        }
    }
}
